package org.fitz.controller.frontend;

import com.fitzframework.core.annotation.Controller;
import com.fitzframework.inject.annotation.Autowired;
import lombok.Getter;
import org.fitz.entity.dto.MainPageInfoDTO;
import org.fitz.entity.dto.Result;
import org.fitz.service.combine.HeadLineShopCategoryCombineService;
import org.fitz.service.solo.ShopCategoryService;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Getter
@Controller
//@RequestMapping(value = "/main")
public class MainPageController {
    @Autowired(name = "HeadLineShopCategoryCombineServiceImpl2")
    private HeadLineShopCategoryCombineService headLineShopCategoryCombineService;

    @Autowired
    private ShopCategoryService shopCategoryService;

    public Result<MainPageInfoDTO> getMainPageInfo(HttpServletRequest req, HttpServletResponse resp){
        return headLineShopCategoryCombineService.getMainPageInfo();
    }
//    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public void throwException(){
        throw new RuntimeException("抛出异常测试");
    }
}
